/******************************************************************关系查找**************************/
export const option2 = {
	legend: {
		show: false
	},
	"series": [
		{
			"type": "graph",
			"name": "部门",
			"layout": "force",
			"draggable": true,
			"force": {
				"repulsion": 180,/*斥力*/
				"gravity": 0.01,/*引力*/
				"initLayout ": "none",
				"edgeLength": [180, 170],
				"layoutAnimation": true
			},

			"roam": true,
			"symbol": "rect",
			symbolSize: 50,
			edgeSymbol: ['circle'],/*箭头*/
			edgeSymbolSize: [0, 10],
			// 连接线上的文字
			focusNodeAdjacency: false, //划过只显示对应关系
			label: {
				normal: {
					show: true,
					position: 'bottom',
					textStyle: {
						color: '#3e4956'
					},
					formatter: function (p) {
						//			                    console.log(p)
						if (p.data.name) {
							if (p.data.hasOwnProperty('value') && p.data.value != 0) {
								if (p.data.name.indexOf("$weiyi_") != -1) {
									return p.data.name.substring(0, p.data.name.indexOf("$weiyi_")) + '(' + p.data.value + ')';
								}
								return p.data.name + '(' + p.data.value + ')'
							} else {
								if (p.data.name.indexOf("$weiyi_") != -1) {

									return p.data.name.substring(0, p.data.name.indexOf("$weiyi_"));
								}
								return p.data.name
							}
						} else {
							return ""
						}
					}
				}
			},
			edgeLabel: { // 连接线上的文字
				normal: {
					show: true,
					textStyle: {
						fontSize: 15,
						color: "#2E96DD"
					},
					formatter: function (p) {
						if (p.data.value && p.data.value != 0) {
							return p.data.value
						} else {
							return ""
						}
					}
				}
			},
			categories: [{/*category===0为显示*/
				name: '显示',
				itemStyle: {
					normal: {
						color: "#009800",
					}
				}
			}],
			"data": [{
				name: '     ',
				"symbol": "image://" + require("@/assets/imgs/user.png"),
				x: 1125,
				y: 662,
				value: 0,
				fixed: true,
				category: 0,
				"symbolSize": 100,
				itemStyle: {
					normal: {
						borderColor: 'red',
						borderWidth: 4,
						shadowBlur: 10,
						shadowColor: '#04f2a7',
						color: '#001c43',
					}
				},

			}, {
				name: '人案关系',
				"symbolSize": 60,
				"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
				x: 945,
				value: 0,
				category: 0,
				y: 677,

			}, {
				name: '亲缘关系',
				"symbolSize": 60,
				"symbol": "image://" + require("@/assets/imgs/tupu56.png"),
				x: 999,
				value: 0,
				category: 0,
				y: 530,
				edgeLength: [50, 40]
			}, {
				name: '人物关系',
				"symbolSize": 60,
				"symbol": "image://" + require("@/assets/imgs/tupu49.png"),
				x: 1154,
				value: 0,
				category: 0,
				y: 481
			}, {
				name: '空间对象',
				"symbolSize": 60,
				"symbol": "image://" + require("@/assets/imgs/tupu64.png"),
				x: 1289,
				value: 0,
				category: 0,
				y: 569
			},
			{
				name: '社会对象',
				"symbolSize": 60,
				"symbol": "image://" + require("@/assets/imgs/tupu89.png"),
				x: 1302,
				value: 0,
				category: 0,
				y: 724,
			},
			{
				name: '地域关系',
				"symbolSize": 60,
				"symbol": "image://" + require("@/assets/imgs/tupu105.png"),
				x: 1184,
				value: 0,
				category: 0,
				y: 833
			},
			{
				name: '业缘关系',
				"symbolSize": 60,
				"symbol": "image://" + require("@/assets/imgs/tupu102.png"),
				x: 1025,
				value: 0,
				category: 0,
				y: 816
			},
			/***************************************************************************************************************************************************************************************************************/
			{
				name: '同案件',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu77.png"),
				x: 785,
				value: 0,
				category: 0,
				y: 647
			}, {
				name: '同监听',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu92.png"),
				x: 795,
				value: 0,
				category: 0,
				y: 743
			},
			/*********/
			{
				name: '同地址',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu61.png"),
				x: 803,
				value: 0,
				category: 0,
				y: 554
			},
			{
				name: '集体同户',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu46.png"),
				x: 842,
				value: 0,
				category: 0,
				y: 467
			},
			{
				name: '同监护',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu36.png"),
				x: 907,
				value: 0,
				category: 0,
				y: 397
			},
			{
				name: '同户',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu24.png"),
				x: 1004,
				value: 0,
				category: 0,
				y: 340
			},
			/***************/
			{
				name: '同号牌',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu18.png"),
				x: 1111,
				value: 0,
				category: 0,
				y: 314
			},
			{
				name: '同违章',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu21.png"),
				x: 1221,
				value: 0,
				category: 0,
				y: 330
			},
			/*********/
			{
				name: '火车同行',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu31.png"),
				x: 1308,
				value: 0,
				category: 0,
				y: 370
			}, {
				name: '汽车同行',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu42.png"),
				x: 1382,
				value: 0,
				category: 0,
				y: 432
			}, {
				name: '航班同行',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu53.png"),
				x: 1440,
				value: 0,
				category: 0,
				y: 520
			},

			{
				name: '同住',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu69.png"),
				x: 1466,
				value: 0,
				category: 0,
				y: 602
			},
			{
				name: '同上网',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu85.png"),
				x: 1469,
				value: 0,
				category: 0,
				y: 697
			},
			/***********/
			{
				name: '同手机',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu97.png"),
				x: 1446,
				value: 0,
				category: 0,
				y: 791
			},
			{
				name: '同证件',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu112.png"),
				x: 1396,
				value: 0,
				category: 0,
				y: 873
			},

			/**********/
			{
				name: '同房东',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu122.png"),
				x: 1330,
				value: 0,
				category: 0,
				y: 938
			},
			{
				name: '同租房',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu129.png"),
				x: 1243,
				value: 0,
				category: 0,
				y: 981
			},
			{
				name: '同地暂住',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu136.png"),
				x: 1150,
				value: 0,
				category: 0,
				y: 1003
			},
			{
				name: '外地同乡',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu132.png"),
				x: 1054,
				value: 0,
				category: 0,
				y: 994
			},
			{
				name: '外地同户',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu125.png"),
				x: 966,
				value: 0,
				category: 0,
				y: 961
			},
			/********/
			{
				name: '同事关系',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu117.png"),
				x: 889,
				value: 0,
				category: 0,
				y: 909
			}, {
				name: '同投资',
				"symbolSize": 30,
				"symbol": "image://" + require("@/assets/imgs/tupu108.png"),
				x: 832,
				value: 0,
				category: 0,
				y: 832
			},],
			"links": [{
				source: 0,
				target: '人案关系',
				lineStyle: {
					normal: {
						color: '#02BDA0',
					}
				}

			},
			{
				source: 0,
				target: '亲缘关系',
				lineStyle: {
					normal: {
						color: '#E97F05',
					}
				}

			},
			{
				source: 0,
				target: '人物关系',
				lineStyle: {
					normal: {
						color: '#2E96DD',
					}
				}

			},
			{
				source: 0,
				target: '空间对象',
				lineStyle: {
					normal: {
						color: '#F3C500',
					}
				}

			},
			{
				source: 0,
				target: '社会对象',
				lineStyle: {
					normal: {
						color: '#344A61',
					}
				}

			},
			{
				source: 0,
				target: '地域关系',
				lineStyle: {
					normal: {
						color: '#1FCD6C',
					}
				}

			},
			{
				source: 0,
				target: '业缘关系',
				lineStyle: {
					normal: {
						color: '#02BDA0',
					}
				}

			},

			/***************/
			{
				source: '人案关系',
				target: '同案件',
				value: "0",
				lineStyle: {
					normal: {
						color: '#02BDA0',
					}
				}
			},
			{
				source: '人案关系',
				target: '同监听',
				value: "0",
				lineStyle: {
					normal: {
						color: '#02BDA0',
					}
				}
			},
			/***********/
			{
				source: '亲缘关系',
				target: '集体同户',
				value: "0",
				lineStyle: {
					normal: {
						color: '#E97F05',
					}
				}
			},
			{
				source: '亲缘关系',
				target: '同地址',
				value: "0",
				lineStyle: {
					normal: {
						color: '#E97F05',
					}
				}
			},
			{
				source: '亲缘关系',
				target: '同户',
				value: "0",
				lineStyle: {
					normal: {
						color: '#E97F05',
					}
				}
			},
			{
				source: '亲缘关系',
				target: '同监护',
				value: "0",
				lineStyle: {
					normal: {
						color: '#E97F05',
					}
				}
			},
			/**************/
			{
				source: '人物关系',
				target: '同号牌',
				value: "0",
				lineStyle: {
					normal: {
						color: '#2E96DD',
					}
				}
			},
			{
				source: '人物关系',
				target: '同违章',
				value: "0",
				lineStyle: {
					normal: {
						color: '#2E96DD',
					}
				}
			},
			/***************/
			{
				source: '空间对象',
				target: '火车同行',
				value: "0",
				lineStyle: {
					normal: {
						color: '#F3C500',
					}
				}
			},
			{
				source: '空间对象',
				target: '汽车同行',
				value: "0",
				lineStyle: {
					normal: {
						color: '#F3C500',
					}
				}
			},
			{
				source: '空间对象',
				target: '航班同行',
				value: "0",
				lineStyle: {
					normal: {
						color: '#F3C500',
					}
				}
			},
			{
				source: '空间对象',
				target: '同住',
				value: "0",
				lineStyle: {
					normal: {
						color: '#F3C500',
					}
				}
			},
			{
				source: '空间对象',
				target: '同上网',
				value: "0",
				lineStyle: {
					normal: {
						color: '#F3C500',
					}
				}
			},
			/****************/
			{
				source: '社会对象',
				target: '同手机',
				value: "0",
				lineStyle: {
					normal: {
						color: '#344A61',
					}
				}
			},
			{
				source: '社会对象',
				target: '同证件',
				value: "0",
				lineStyle: {
					normal: {
						color: '#344A61',
					}
				}
			},

			/***********/
			{
				source: '地域关系',
				target: '同房东',
				value: "0",
				lineStyle: {
					normal: {
						color: '#1FCD6C',
					}
				}
			},
			{
				source: '地域关系',
				target: '同租房',
				value: "0",
				lineStyle: {
					normal: {
						color: '#1FCD6C',
					}
				}
			},
			{
				source: '地域关系',
				target: '同地暂住',
				value: "0",
				lineStyle: {
					normal: {
						color: '#1FCD6C',
					}
				}
			},
			{
				source: '地域关系',
				target: '外地同乡',
				value: "0",
				lineStyle: {
					normal: {
						color: '#1FCD6C',
					}
				}
			},
			{
				source: '地域关系',
				target: '外地同户',
				value: "0",
				lineStyle: {
					normal: {
						color: '#1FCD6C',
					}
				}
			},
			/********/
			{
				source: '业缘关系',
				target: '同事关系',
				value: "0",
				lineStyle: {
					normal: {
						color: '#9C56B9',
					}
				}
			},
			{
				source: '业缘关系',
				target: '同投资',
				value: "0",
				lineStyle: {
					normal: {
						color: '#9C56B9',
					}
				}
			},
			]
		}]
};















/******************************************************************关系分析**************************/
export const option3 = {
	legend: {
		show: false
	},
	"series": [
		{
			"type": "graph",
			"name": "部门",
			"layout": "force",
			"draggable": true,
			"force": {
				"repulsion": 180,/*斥力*/
				"gravity": 0.001,/*引力*/
				"initLayout ": "none",
				"edgeLength": [200, 190],
				"layoutAnimation": true
			},

			"roam": true,
			"symbol": "rect",
			symbolSize: 50,
			edgeSymbol: ['circle', 'arrow'],/*箭头*/
			edgeSymbolSize: [0, 10],
			// 连接线上的文字
			focusNodeAdjacency: false, //划过只显示对应关系
			label: {
				normal: {
					show: true,
					position: 'bottom',
					textStyle: {
						color: '#3e4956'
					},
					formatter: function (p) {
						//			                    console.log(p)
						if (p.data.name) {
							if (p.data.hasOwnProperty('value') && p.data.value != 0) {
								if (p.data.name.indexOf("$weiyi_") != -1) {
									return p.data.name.substring(0, p.data.name.indexOf("$weiyi_")) + '(' + p.data.value + ')';
								}
								return p.data.name + '(' + p.data.value + ')'
							} else {
								if (p.data.name.indexOf("$weiyi_") != -1) {

									return p.data.name.substring(0, p.data.name.indexOf("$weiyi_"));
								}
								return p.data.name
							}
						} else {
							return ""
						}
					}
				}
			},
			edgeLabel: { // 连接线上的文字
				normal: {
					show: true,
					textStyle: {
						fontSize: 13,
						color: "#2E96DD"
					},
					formatter: function (p) {
						if (p.data.value && p.data.value != 0) {
							return p.data.value
						} else {
							return ""
						}
					}
				}
			},
			categories: [{/*category===0为显示*/
				name: '显示',
				itemStyle: {
					normal: {
						color: "#009800",
					}
				}
			}],
			"data": [
				{
					name: '   ',
					"symbol": "image://" + require("@/assets/imgs/user.png"),
					value: 0,
					category: 0,
					fixed: true,
					x: 800,
					y: 400,
					zjhm: '430726195304206320',
					"symbolSize": 100,
				},
				{
					name: '钟珊珊',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '何珊珊',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '黄珊珊',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '李珊珊',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '钱珊珊',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '孙珊珊',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '余珊珊',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '珊珊1',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '李珊珊2',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '李珊珊3',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
				{
					name: '李珊珊4',
					"symbolSize": 60,
					"symbol": "image://" + require("@/assets/imgs/tupu82.png"),
					value: 0,
					zjhm: '430726195304206320',
					category: 0,
				},
			],
			"links": [
				{
					source: 0,
					target: 1,
					value: '情人'
				},
				{
					source: 0,
					target: 2,
					value: '亲人'
				},
				{
					source: 0,
					target: 3,
					value: '朋友'
				},
				{
					source: 0,
					target: 4,
					value: '伙伴'
				},
				{
					source: 0,
					target: 5,
					value: '仇人'
				},
				{
					source: 0,
					target: 6,
					value: '儿子'
				},
				{
					source: 0,
					target: 7,
					value: '母女'
				},
				{
					source: 0,
					target: 8,
					value: '前夫'
				},
				{
					source: 0,
					target: 9,
					value: '姐妹'
				},
				{
					source: 0,
					target: 10,
					value: '夫妻'
				},
				{
					source: 0,
					target: 11,
					value: '同旅馆'
				},

			]
		}]
};



